Skip to content

fix: update TestMCPGSupportsIntegrityReactions for MCPG v0.2.19 default#26091

Merged
dsyme merged 3 commits intomainfrom
fix/mcpg-integrity-reactions-test
Apr 13, 2026
Merged

fix: update TestMCPGSupportsIntegrityReactions for MCPG v0.2.19 default#26091
dsyme merged 3 commits intomainfrom
fix/mcpg-integrity-reactions-test

Conversation

@dsyme
Copy link
Copy Markdown
Collaborator

@dsyme dsyme commented Apr 13, 2026

Problem

The MCPG version bump from v0.2.17 to v0.2.19 (#26071) didn't update the integrity-reactions test expectations added in #25948. The DefaultMCPGatewayVersion is now v0.2.19 which is >= MCPGIntegrityReactionsMinVersion (v0.2.18), so the nil/empty gateway config test cases should expect true (supported) instead of false.

Fix

Updated two test cases in TestMCPGSupportsIntegrityReactions:

  • nil gateway config uses default: want: falsewant: true
  • empty version uses default: want: falsewant: true

Updated test names and comments to reflect the current default version.

The MCPG version bump from v0.2.17 to v0.2.19 (#26071) didn't update
the integrity-reactions test expectations (#25948). The default version
v0.2.19 is now >= min v0.2.18, so nil/empty config cases should expect
true (supported) instead of false.
Copilot AI review requested due to automatic review settings April 13, 2026 21:20
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates failing/incorrect test expectations for the MCPG integrity-reactions version gate now that the default MCP Gateway version is v0.2.19 (>= the minimum v0.2.18).

Changes:

  • Adjusts TestMCPGSupportsIntegrityReactions expectations for nil/empty gateway config to expect support (true) given the new default version.
  • Updates test case names/comments to reflect the current default MCPG version behavior.
Show a summary per file
File Description
pkg/workflow/tools_validation_test.go Updates MCPG integrity-reactions support test cases to match the new default gateway version behavior.

Copilot's findings

Tip

Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

  • Files reviewed: 1/1 changed files
  • Comments generated: 1

Comment thread pkg/workflow/tools_validation_test.go Outdated
Comment on lines +648 to +651
name: "nil gateway config uses default (v0.2.19, above min)",
gatewayConfig: nil,
// DefaultMCPGatewayVersion = "v0.2.17" < MCPGIntegrityReactionsMinVersion = "v0.2.18"
want: false,
// DefaultMCPGatewayVersion = "v0.2.19" >= MCPGIntegrityReactionsMinVersion = "v0.2.18"
want: true,
Copy link

Copilot AI Apr 13, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The test names/comments hardcode the current DefaultMCPGatewayVersion (v0.2.19). This has already drifted once when the default version was bumped, and it will drift again on the next bump. Consider making these names/comments version-agnostic (e.g., “uses default (above/below min)”) or constructing the name via fmt.Sprintf using constants.DefaultMCPGatewayVersion so it stays accurate without manual updates.

Copilot uses AI. Check for mistakes.
dsyme added 2 commits April 14, 2026 07:24
Compute the expected result for nil/empty gateway config test cases
dynamically from DefaultMCPGatewayVersion and MCPGIntegrityReactionsMinVersion
so the test doesn't break every time the default MCPG version is bumped.
@dsyme dsyme merged commit 0b3120a into main Apr 13, 2026
56 of 57 checks passed
@dsyme dsyme deleted the fix/mcpg-integrity-reactions-test branch April 13, 2026 21:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants